<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>05_BOM操作</title>
</head>
<body>
<button onclick="alert('弹出警告框')">弹出警告框</button>
<button onclick="confirm('您确认要删除张三吗?')">弹出确认框</button>
<button onclick="prompt('弹出输入框')">弹出输入框</button>
<script>
    //将参数转为整数
    console.log(parseInt(6.6));//6
    console.log(parseInt(6.1));//6
    console.log(parseInt(6));//6
    console.log(parseInt('hhh'));//NaN
    console.log(parseInt('12h34hh56'));//12
    //将参数转为小数
    console.log(parseFloat('5.6'))//5.6
    console.log(parseFloat('5'))//5
    console.log(parseFloat('hhh'))//NaN
    console.log(parseFloat('1.2h34hh56'));//1.2

    //用于判断参数是否为非数字,如果是非数字,结果是true,反之是false
    console.log(isNaN('aaa'));
    console.log(isNaN(7));
    console.log(isNaN(7.2));
</script>



</body>
</html>